package sg.edu.nus.iss.club;

public class Member extends Person implements Comparable<Member> {

    private int memberNumber;

    public Member (String surname, String firstName, String secondName,
						int memberNumber) {
        super (surname, firstName, secondName);
        this.memberNumber = memberNumber;
    }

    public int getMemberNumber () {
        return memberNumber;
    }

    public String toString () {
        return (memberNumber + " - " + super.toString ());
    }
    
    public int compareTo(Member other) {
    	if (this.memberNumber == other.getMemberNumber()) {
    		return 0;
    	} else if (this.memberNumber > other.getMemberNumber()) {
    		return 1;
    	} else {
    		return -1;
    	}
    }
    
    
}
